package com.flyduck.system.vo.user.trans;


import cn.hutool.core.bean.BeanUtil;
import com.flyduck.common.vo.UserInfoVO;
import com.flyduck.system.entity.SysUserEntity;
import com.google.common.base.Function;


/**
 * @program: flyduck-platform
 * @description:
 * @author: flyduck
 * @create: 2021-02-01 12:42
 **/
public class SysUserEntityToUserInfoVO implements Function<SysUserEntity, UserInfoVO> {


    @Override
    public UserInfoVO apply(SysUserEntity entity) {
        UserInfoVO userInfoVO = new UserInfoVO();
        BeanUtil.copyProperties(entity,userInfoVO);
        userInfoVO.setId(entity.getId() + "");
        userInfoVO.setDeptId(entity.getDeptId() + "");
        return userInfoVO;
    }
}
